function getGoods(s){$.get(`./json/index/menu/${s}.json`,function(s){$(".menu-panel-main").html(""),s.forEach(s=>{let i=$('<div class="items"></div>').appendTo(".menu-panel-main").html(`
                                 <div class="info">${s.category.name}</div><div class="goods"></div>`).find(".goods");0!=s.category.goods.length?s.category.goods.forEach(s=>{i.append($(`   <div class="god">
                                             <img src="${s.mainImg}" width="45" height="45">
                                             <span>${s.spuName}</span>
                                     </div>`))}):s.child.forEach(s=>{i.append($(`   <div class="god">
                                             <img src="${s.category.logo.mainPic}" width="45" height="45">
                                             <span>${s.category.name}</span>
                                     </div>`))})})})}function getSeckill(){$.get("./json/index/seckill/0.json",function(i,s,e){$(".seckill .shop > .right  .item").each(function(s){$(this).html(`<div class="box hover-s">
            <div class="one"><img src="${i[s].url}" width="155" height="155"></div>
        <div class="two">${i[s].title}</div>
        <div class="three fl">
            <div class="c"><div class="nei"></div></div>
            <div class="text">已抢40%</div>
        </div>
        <div class="four fl">
            <div class="left"><span>￥${i[s].price}</span><span>￥${i[s].originalPrice}</span></div>
            <div class="btn">${i[s].buttonStatusDesc}</div>
        </div>
        </div>`)})})}function getHotgoods(){$.get("./Shopping/getGoodsListNew.php",{count:8},function(s){console.log(s),s.forEach(s=>{$(".hotshop .hotgoods").append($(` 
                <div class="items">
                    <a href="./products.html?goodsId=${s.goodsId}">
                    <div class="hot-good hover-s">
                     <div class="imgs"><img src="${s.goodsImg}" alt=""></div>
                    <div class="info">
                    <div class="title">${s.goodsName}</div>
                    <div class="discount">${s.beiyong1}</div>
                    <div class="price">￥${Number(s.goodsPrice)}</div>
                    </a>
                </div>
                </div>
            </div>`))})},"json")}function getArea(){$.get("./json/index/shop/list.json",function(s){s.forEach((s,i)=>{let e=$(".tab-menu").eq(i).html(""),o=$(".tab-window").eq(i).html("");s.forEach(s=>{e.append($(`<li>${s.title}</li>`)),o.append($('<div class="box"></div>'))}),getGooditem(i,o)})})}function getGooditem(s,e){$.get(`./json/index/shop/${s}.json`,function(i){e.children().each(function(s){let e=null;e=""!=i[s].url?$(`<ul class="tab-goods-items"><a href=""><img src="${i[s].url}" class="hover-s"></a></ul>`).appendTo($(this)):e=$(`<ul class="tab-goods-items">
                    
                    <div class="head-good hover-s">

                    <img src="${i[s].productDetailss[0].url}">
                    <div class="info">
                        <div class="price-title">${i[s].productDetailss[0].title}</div>
                        <div class="price-info"><span class="price"><span class="butie">${i[s].productDetailss[0].pricePrefix||""}</span>￥${i[s].productDetailss[0].price}</span>
                        <span class="old">${i[s].productDetailss[0].originalPrice||""}</span></div>
                    </div>

                </div>
                    
                    
                    </ul>`).appendTo($(this)),i[s].productDetailss.forEach((s,i)=>{0!=i&&$(` <li class="hover-s">
                    <a>
                        <img src="${s.url}">
                        <div class="price-title">${s.title}</div>
                        <div class="price"><span class="butie">${s.pricePrefix||""}</span>￥${s.price}<span class="old">${s.originalPrice||""}</span></div>
                    </a>
                </li>`).appendTo(e)})})})}$(".app-banner .center .banner-menu ul li ").mouseover(function(){getGoods($(this).index()),$(".app-banner .center .big-box").css({width:980}).mouseover(function(){$(".app-banner .center .big-box").css({width:980}).find(".menu-panel").show()}).mouseout(function(){$(".app-banner .center .big-box").css({width:220}).find(".menu-panel").hide()})}),getSeckill(),getHotgoods(),$(".tab-area .tab-menu").on("click","li",function(s){$(this).css({color:" #000"}).siblings().css({color:" #9e9e9e"}),$(this).parentsUntil(".tab-area").next().children().eq($(this).index()).css({display:"block"}).siblings().css({display:"none"})}),getArea();